﻿using Bll;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Myproject.BSM.PcWeb.PcBase
{
    public partial class NavigationEdit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string NavID = Request.QueryString["id"];
            string ParentID = Request.QueryString["pid"];
            if (!string.IsNullOrEmpty(NavID))
            {
                pc_base_navEdit_NavID.Value = NavID;
                NavModel model = new NavBLL().GetModel(Int32.Parse(NavID));
                pc_base_navEdit_parentID.Value = model.ParentID.ToString();
                pc_base_navEdit_name.Value = model.Title;
                pc_base_navEdit_ename.Value = model.ETitle;
                pc_base_navEdit_url.Value = model.Url;
                pc_base_navEdit_eurl.Value = model.EUrl;
                pc_base_navEdit_frank.Value = model.FatherRank.ToString();
                pc_base_navEdit_srank.Value = model.SonRank.ToString();
            }
            else
            {
                pc_base_navEdit_parentID.Value = ParentID;
            }
        }
    }
}